﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package mochicrypt.as3 {
    import flash.utils.*;

    public dynamic class MochiSync extends Proxy {

        public static var SYNC_PROPERTY:String = "UpdateProperty";
        public static var SYNC_REQUEST:String = "SyncRequest";

        private var _syncContainer:Object;

        public function MochiSync():void{
            this._syncContainer = {};
        }
        override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{
            if (this._syncContainer[_arg1] == _arg2){
                return;
            };
            var _local3:String = _arg1.toString();
            this._syncContainer[_local3] = _arg2;
            MochiServices.send("sync_propUpdate", {
                name:_local3,
                value:_arg2
            });
        }
        override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){
            return (this._syncContainer[_arg1]);
        }
        public function triggerEvent(_arg1:String, _arg2:Object):void{
            switch (_arg1){
                case SYNC_REQUEST:
                    MochiServices.send("sync_syncronize", this._syncContainer);
                    break;
                case SYNC_PROPERTY:
                    this._syncContainer[_arg2.name] = _arg2.value;
                    break;
            };
        }

    }
}//package mochicrypt.as3 
